package org.conducta.ui.swing.fixture;

import java.util.ArrayList;
import java.util.List;
import org.fest.swing.fixture.JToggleButtonFixture;

/**
 *
 * @author Stoyan Vassilev
 */
public class JToggleButtonGroupFixture {
 private final List<JToggleButtonFixture> m_toggleFixtures;
 public JToggleButtonGroupFixture(JToggleButtonFixture... radioFixtures) {
    m_toggleFixtures = new ArrayList<JToggleButtonFixture>();
    for (JToggleButtonFixture radioFixture: radioFixtures)
    {
        m_toggleFixtures.add(radioFixture);
    }
 }
 
 public JToggleButtonFixture findByText(String text) {
    for (JToggleButtonFixture toggleFixture: m_toggleFixtures)
    {
        if (text.equals(toggleFixture.text()))
        {
            return toggleFixture;
        }
    }
    return null;
 }
}
